home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / models / weapons / kar98.tik < prev    next >
Encoding:
Text File  |  2002-10-21  |  9.0 KB  |  363 lines

  1. TIKI
  2.  
  3. setup
  4. {
  5.     scale 0.52                    // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
  6.     path models/weapons/KAR98
  7.     skelmodel KAR98.skd
  8.     surface KAR981 shader KAR98
  9.     surface KAR982 shader KAR98
  10.     surface material7 shader m1clip
  11.     surface material8 shader m1clip
  12. }
  13.  
  14. init
  15. {
  16.     server
  17.         {
  18.     //========================================//
  19.     //        WEAPON NAME                  //
  20.     //========================================//
  21.  
  22.         classname        Weapon
  23.         weapontype        rifle
  24.         name            "Mauser KAR 98K"
  25.         rank            220 220
  26.  
  27.     //========================================//
  28.     //        WEAPON ACCURACY               //
  29.     //========================================//
  30. //        Kar98K: Max Eff. Range is 400 yds with a muzzle velocity of 2650 ft/s. (7.92 x 57mm Mauser)
  31.  
  32.         sp bulletrange        4000             //the range at which bulletspread is applied
  33.         sp bulletspread        8 8 65 65         //minpitch minyaw maxpitch maxyaw
  34.  
  35.         dm bulletrange        4000
  36.         dm bulletspread        2 2 65 65
  37.  
  38.         realism bulletrange    4000
  39.         realism bulletspread    2 2 65 65
  40.  
  41.     //========================================//
  42.     //        DAMAGE / RATE OF FIRE          //
  43.     //========================================//
  44.  
  45.         sp bulletdamage        75
  46.         dm bulletdamage        80     //had to reduce the damage since it fires about twice as fast as the sniper rifles - was 75 then 110 then 115 then 106
  47.  
  48.         sprealism bulletdamage    100
  49.         dmrealism bulletdamage     100    
  50.  
  51.         sp firedelay         1.2    //was 1.45
  52.         dm firedelay        1.1    //was 1.45
  53.         realism firedelay        1.1
  54.  
  55.         realism throughwood    24
  56.         realism throughmetal    8
  57.  
  58.     //========================================//
  59.     //        PLAYER MOVEMENT              //
  60.     //========================================//
  61.  
  62.         sp movementspeed        1.0
  63.         dm movementspeed        1.05
  64.         realism movementspeed        1.05
  65.  
  66.     //========================================//
  67.     //        RIFLE BUTT / SECONDARY FIRE    //
  68.     //========================================//
  69.  
  70.         secondary firetype        melee
  71.         secondary ammotype        none
  72.         secondary ammorequired        0
  73.         secondary meansofdeath        bash
  74.         secondary bulletknockback    50
  75.         secondary quiet
  76.  
  77.         sp secondary bulletrange    64
  78.         sp secondary bulletdamage    60
  79.  
  80.         dm secondary bulletrange    96
  81.         dm secondary bulletdamage    60
  82.  
  83.         realism secondary bulletrange        96
  84.         realism secondary bulletdamage    60
  85.  
  86.     //========================================//
  87.     //        AMMO                      //
  88.     //========================================//
  89.  
  90.         firetype        bullet
  91.         ammotype        "rifle"
  92.         meansofdeath    bullet
  93.         semiauto
  94.         bulletcount        1
  95.         clipsize        5
  96.         ammorequired    1
  97.         bulletlarge        1
  98.  
  99.         sp startammo    5
  100.         dm startammo    80
  101.         sprealism startammo    5
  102.         dmrealism startammo    60
  103.  
  104.         // Additional DM Loadout
  105.         dm additionalstartammo "grenade" 4
  106.         dm additionalstartammo "smokegrenade" 2
  107.         dm startitem "items/binoculars.tik"
  108.  
  109.         // Additional DM Realism Loadout
  110.         dmrealism additionalstartammo "grenade" 4
  111.         dmrealism additionalstartammo "smokegrenade" 2
  112.         dmrealism startitem "items/binoculars.tik"
  113.  
  114.     //========================================//
  115.     //        CROSSHAIR, ZOOM, TRACERS      //
  116.     //========================================//
  117.  
  118.         sp tracerfrequency         2 //original 0
  119.         dm tracerfrequency         0
  120.         sprealism tracerfrequency     0 //original 2
  121.         dmrealism tracerfrequency     0
  122.  
  123.         crosshair            1
  124.  
  125.     //========================================//
  126.     //        SOUND, AI, OTHER              //
  127.     //========================================//
  128.  
  129.         pickupsound        kar98_snd_pickup
  130.         ammopickupsound        kar98_snd_pickup_ammo
  131.         noammosound        kar98_snd_noammo
  132.  
  133.         // Holstering info
  134. //        holstertag        "Bip01 Spine2"
  135. //        holsteroffset        "8.0 -7.75 6.5"
  136. //        holsterangles        "0 185 -25"
  137. //        holsterScale        1.0
  138.  
  139.         // AI animation group info
  140.         weapongroup        rifle
  141.         airange            long
  142.  
  143.         surface material7 +nodraw
  144.         surface material8 +nodraw
  145.         
  146.         // this is attached to the player during reload
  147.         cache models/ammo/kar98_clip_reload.tik
  148.     }
  149.     client
  150.     {
  151.         cache tracer.spr
  152.         cache muzsprite.spr
  153.         cache models/fx/snipesmoke.tik
  154.         cache models/ammo/rifleshell.tik
  155.     }
  156. }
  157.  
  158. animations
  159. {
  160.     idle        KAR98.skc
  161.     {
  162.         server
  163.         {
  164.             entry surface material7 +nodraw
  165.             entry surface material8 +nodraw
  166.         }
  167.     }
  168. //    reload    reload_KAR98.skc
  169.     reload    reload_KAR98.skc // this is the start of the reloading sequence
  170.     {
  171.         client
  172.         {
  173.             entry sound kar98_snd_reload item
  174.         }
  175.         server
  176.         {
  177.             entry surface material7 +nodraw
  178.             entry surface material8 +nodraw
  179.             43 surface material7 -nodraw
  180.             43 surface material8 -nodraw
  181.             53 surface material7 +nodraw
  182.             62 surface material8 +nodraw
  183.             last surface material7 +nodraw
  184.             last surface material8 +nodraw
  185.             last idle
  186.         }
  187.     }
  188.     reload_single KAR98.skc // this is the reload loop that loads in a single shell
  189.     {
  190.         client
  191.         {
  192.             entry sound kar98_snd_reload_single item
  193.         }
  194.     }
  195.     reload_end KAR98.skc
  196.     {
  197.         server
  198.         {
  199.             last idle
  200.         }
  201.         client
  202.         {
  203.             entry sound kar98_snd_reload_end item
  204.         }
  205.     }
  206.     rechamber    rechamber_kar98.skc
  207.     {
  208.         client
  209.         {
  210.             entry sound kar98_snd_bolt item
  211.             18 tagspawn tag_eject 1024
  212.             (
  213.                 spawnrange 2048
  214.                 count 1
  215.                 model models/ammo/rifleshell.tik
  216.                 scale 1.0
  217.                 velocity 70
  218.                 randvel crandom 10 crandom 10 random 20
  219.                 emitterangles 0 0 0
  220.                 avelocity crandom 90 crandom 90 0
  221.                 accel 0 0 -800
  222.                 physicsrate 20
  223.                 life 2.0
  224.                 fadedelay 1.7
  225.                 collision
  226.                 bouncefactor 0.2
  227.                 bouncesoundonce snd_rifle_shell
  228.             )
  229.         }
  230.     }
  231.     secondaryfire     KAR98.skc
  232.     {
  233.         server
  234.         {
  235.             entry shoot secondary
  236.         }
  237.     }
  238.     fire        KAR98.skc
  239.     {
  240.         server
  241.         {
  242.             entry shoot
  243.             entry surface material7 +nodraw
  244.             entry surface material8 +nodraw
  245.         }
  246.         client
  247.         {
  248.             entry stopaliaschannel kar98_snd_fire
  249.             entry sound kar98_snd_fire
  250.  
  251.             // By now, the server has already fired the weapon, so it's
  252.             // ok to apply the view kick apon entry to avoid problems
  253.             // with multiple application on single frame animations.
  254.  
  255.             ////////////////////////////////////////////////////////////////////////////////////////
  256.             // View Kicking
  257.             //
  258.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  259.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  260.             // will be explained.
  261.             // Scatter Patterns:
  262.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  263.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction.
  264.             //
  265.             //
  266.             //                     +-------------------------------------------- Scatter Pitch Min
  267.             //                      |    +--------------------------------------- Scatter Pitch Max
  268.             //                      |    |       +------------------------------- Scatter Yaw Min
  269.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  270.             //                     |    |       |   |     +--------------------- The Recentering speed in fraction per second
  271.             //                      |    |       |   |     |    +---------------- The Scatter Pattern
  272.             //                      |    |       |   |     |    |     +---------- The absolute pitch min/max
  273.             //                      |    |       |   |     |    |     |  +------- The absolute yaw min/max
  274.             //                      |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  275.             //                      |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  276.             //                      |    |       |   |     |    |     |  | |      purely random.
  277.             //                V    V       V   V     V    V     V  V V
  278.             entry viewkick         -3.5 -4.0    -1.0 -1.05 2.5  "T"   5.0 2.0 5
  279.  
  280. //            entry viewkick         -1.2 -1.2    -0.2  0.2   1   "V"   3.0 1.0 1.6 (Colt .45 Pistol)
  281.  
  282. //            entry viewkick -3.5 -4.0   -1.0 1.0 (old)
  283.  
  284.             // muzzle flash
  285.             entry tagdlight tag_barrel 0.25 0.2 0.15 150 0.11
  286.             entry tagspawnlinked tag_barrel
  287.             (
  288.                 model muzsprite.spr
  289.                 count 1
  290.                 alpha .5
  291.                 color 1.00 1.00 1.00
  292.                 varycolor
  293.                 scale 0.70
  294.                 life 0.05
  295.                 scalerate 1.00
  296.                 velocity 4.00
  297.                 friction 3.00
  298.                 fade
  299.                 alignstretch 1.00
  300.                 randomroll
  301.             )
  302.             entry tagspawnlinked tag_barrel
  303.             (
  304.                 model muzsprite.spr
  305.                 count 1
  306.                 alpha .5
  307.                 color 1.00 1.00 1.00
  308.                 scale 0.60
  309.                 life 0.05
  310.                 scalerate 0.70
  311.                 velocity 17.00
  312.                 offsetalongaxis 5 0 0
  313.                 fade
  314.                 alignstretch 0.40
  315.                 randomroll
  316.             )
  317.  
  318.             entry tagspawnlinked tag_barrel
  319.             (
  320.                 model muzsprite.spr
  321.                 count 1
  322.                 alpha .5
  323.                 color 1.00 1.00 1.00
  324.                 scale 0.60
  325.                 life 0.05
  326.                 velocity 18.00
  327.                 offsetalongaxis 9 0 0
  328.                 fade
  329.             )
  330.  
  331.             // smoke puff used on sniper version of kar98
  332.             entry commanddelay 0.020 tagspawn tag_barrel
  333.             (
  334.                 spawnrate 1.00
  335.                 model vsssource.spr
  336.                 //count 1
  337.                 alpha 0.10
  338.                 color 1.00 1.00 1.00
  339.                 spritegridlighting
  340.                 scale 0.09
  341.                 life .9
  342.                 scalerate 23.00
  343.                 velocity 429.00
  344.                 accel 0.00 20.00 30.00
  345.                 friction 2.00
  346.                 fade
  347.                 offsetalongaxis random 4 0 0
  348.             )
  349.  
  350.             entry tagspawn tag_barrel
  351.             (
  352.                 count 1
  353.                 scale .7
  354.                 model models/fx/snipesmoke.tik
  355.             )
  356.         }
  357.     }
  358. }
  359.  
  360. /*QUAKED addon_playerweapon_german_kar98 (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  361. German rifle - Mauser KAR98.
  362. */
  363.